import 'package:flutter/material.dart';

class Exam_15 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("填充Padding"),
      ),
      body: Content(),
    );
  }
}

class Content extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Padding(
      padding: EdgeInsets.all(16.0),//上下左右各添加16像素补白
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,//左对齐
        children: <Widget>[
          Padding(
            //左边添加8像素留白
            padding: const EdgeInsets.only(left: 8.0),
            child: Text("Hello"),
          ),

          Padding(
            //上下各添加9像素留白
            padding: const EdgeInsets.symmetric(vertical: 8.0),
            child: Text("Hello"),
          ),

          Padding(
            padding: const EdgeInsets.fromLTRB(20,0,20,20),
            child: Text("World"),
          ),
        ],

      ),
    );
  }
}
